import { ApiProperty } from '@nestjs/swagger'

export class ClassInfoDto {
  @ApiProperty({ description: '班级ID' })
  classId: number

  @ApiProperty({ description: '班级名称' })
  className: string

  @ApiProperty({ description: '带班老师' })
  teacherName: string

  @ApiProperty({ description: '加入班级时间' })
  joinAt: Date

  @ApiProperty({ description: '该班级打卡天数' })
  checkinDays: number

  @ApiProperty({ description: '该班级打卡率', example: '75%' })
  checkinRate: string
}

/**
 * 包含班级和打卡信息的学生数据DTO
 */
export class StudentWithClassInfoDto {
  @ApiProperty({ description: '学生ID' })
  id: number

  @ApiProperty({ description: '学员ID' })
  studentId: string

  @ApiProperty({ description: '姓名' })
  userName: string

  @ApiProperty({ description: '手机号' })
  phone: string

  @ApiProperty({ description: '总打卡天数' })
  totalCheckinDays: number

  @ApiProperty({ description: '总打卡率', example: '75%' })
  totalCheckinRate: string

  @ApiProperty({ description: '当周平均打卡' })
  weeklyAverageCheckin: number

  @ApiProperty({ description: '当月平均打卡' })
  monthlyAverageCheckin: number

  @ApiProperty({ description: '班级信息', type: [ClassInfoDto] })
  classes: ClassInfoDto[]
} 